package com.kmzx.one.project.controller;


import com.kmzx.one.project.service.ExpandUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "快美甄选_[ 会员_推广_接口 ]")
@RestController
public class ExpandController extends BaseController {


    @Autowired
    ExpandUserService expandUserService;
//
    @ApiOperation(value = "1.获取 渠道的 用户信息")
    @GetMapping(value = "expand/spread")
    public void checkUserChannel(String chUnionId, String prodId,String channelId) {

        expandUserService.checkExpandUser(chUnionId,prodId,channelId);

    }


    @ApiOperation(value = "2.渠道访问人数新增")
    @GetMapping(value = "expand/spread_add")
    public void spreadChannelUser(String channelId, String userId, String prodId, String chUnionId) {
        logger.info("扩展渠道的用户信息来了,{},{},{},{}", channelId, userId, prodId, chUnionId);
        expandUserService.insertExpandUserLog(channelId, userId, prodId, chUnionId);
        logger.info("新增扩展用户信息的数据处理OK了");
    }

}
